<!--
 * @Author: your name
 * @Date: 2020-02-14 14:22:44
 * @LastEditTime: 2020-02-24 09:39:30
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \福路德\html\logistics.html
 -->
<!DOCTYPE html>
<html lang="en">

<head>
	<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no, minimal-ui" />
	<meta name="apple-mobile-web-app-capable" content="yes" />
	<meta name="apple-mobile-web-app-status-bar-style" content="black" />
	<meta name="format-detection" content="telephone=no, email=no" />
	<meta charset="UTF-8">
	<title></title>
	<link rel="stylesheet" type="text/css" href="../css/vant.css">
	<link rel="stylesheet" type="text/css" href="../css/base.css" />
	<link rel="stylesheet" type="text/css" href="../css/local.css" />
	<script type="text/javascript" src="../script/jquery.js"></script>
	<script type="text/javascript" src="../script/layer/mobile/layer.js"></script>
	<script type="text/javascript" src="../script/vue.min.js"></script>
	<script src="../script/vant.min.js"></script>
	<script type="text/javascript" src="../script/fastclick.js"></script>
	<script type="text/javascript" src="../script/base.js"></script>
	<style>


	</style>

</head>

<body>
	<div id="app" v-cloak>
		<div class="init-full">
			<van-nav-bar class="head" title="物流信息" left-arrow @click-left="onClickLeft"></van-nav-bar>
			<div class="body-with-bottom">
				<div class="content">
					<div>
						<van-cell title="物流公司" :value="getName()"></van-cell>
						<van-cell title="物流单号" :value="logisticsData.LogisticCode"></van-cell>
						<div>
							<van-steps direction="vertical" :active="0" active-color="#cd1b21">
								<van-step v-for="row in logisticsData.Traces">
									<h3 style="font-size: 14px;">{{row.AcceptStation}}</h3>
									<p>{{row.AcceptTime}}</p>
								</van-step>
							</van-steps>
							<div v-if="!logisticsData.Traces.length" style="color: #9e9e9e;padding:15px;">暂无物流信息</div>
						</div>
					</div>

				</div>
				<van-loading v-if="showLoading" />
			</div>
		</div>
	</div>
</body>
<script type="text/javascript">
	var vm;
	apiready = function () {
		//$('.init-full').show();

		var OrderId = api.pageParam.OrderId;

		vm = new Vue({
			el: '#app',
			data: {
				showLoading: false,
				serverIP: 'http://' + FLD.serverIP,
				shoppingMallServerIP: 'http://' + FLD.shoppingMallServerIP,
				logisticsData: ''

			},
			created: function () {
				this.getLogisticsData();
			},
			methods: {
				getLogisticsData() {
					var that = this;
					that.showLoading = true;
					FLD.logisticsAjax({ orderId: OrderId }, function (res) {
						that.showLoading = false;
						res.Traces = res.Traces.reverse();
						that.logisticsData = res;
					})
				},
				getName() {
					var that = this;
					if (that.logisticsData) {
						if (that.logisticsData.ShipperCode == 'ZTO') {
							return '中通快递';
						} else {
							return that.logisticsData.ShipperCode
						}
					}

				},
				onClickLeft() {
					api.closeWin();
				}
			}
		})
	};
</script>

</html>